\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{fontspec}
% \usepackage{color}
\usepackage{xcolor}

\setmonofont{Jetbrains Mono Regular}
\title{listing}
\author{Ruiming Guo}
\date{May 2021}

\begin{document}

\maketitle

\section{Introduction}


    \begin{lstlisting}[language = C++, numbers=left,
        numberstyle=\tiny,keywordstyle=\color{blue!70},
        commentstyle=\color{red!50!green!50!blue!50},frame=shadowbox,
        rulesepcolor=\color{red!20!green!20!blue!20},basicstyle=\ttfamily]
        void work();
        std::thread my_thread(work);
    \end{lstlisting}

\end{document}
